package com.raymon.perf.ms.web.controller;

import com.raymon.perf.common.webapi.CommonResult;
import com.raymon.perf.export.service.ExportService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DemoController {
    static {
        System.out.println(1);
    }
    @DubboReference
    private ExportService echoService;

    @RequestMapping(value = "/echo", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<String> echo(String message) {
        return CommonResult.success(echoService.echo(message));
    }
}
